import requests


class LoginAPI(object):
    # 获取验证码
    @classmethod
    def get_verify_code(cls,session):

        session.get('https://ihrm-java.itheima.net/#/login')

    # 登录接口
    @classmethod
    def login(cls, session,login_data):

        resp = session.post(url='https://ihrm-java.itheima.net/#/login', data=login_data)
        return resp

# if __name__ == '__main__':
#     session = requests.Session()
#     LoginAPI.get_verify_code(session)
#     login_data = {"mobile":"0102030405060708","password":"123456"}
#     LoginAPI.login(session,login_data)
